package com.stu.day08.shape;

/**
 * 演示:
 *
 * @author mm
 * @date 2025/1/13 16:26:32
 */
public class Rect extends AbstractShape {
    private double width;
    private double height;

    public Rect(double width, double height) {
        super();
        this.width = width;
        this.height = height;
    }

    public double girth() {
        return (width + height) * 2;
    }

    public double area(){
        return width * height;
    }
}
